package com.gqz.controller.common;


import com.gqz.dto.ArticleTypeDto;
import com.gqz.service.IBlogArticleTypeService;
import com.gqz.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/blog/articleType")
public class BlogArticleTypeController {

    @Autowired
    private IBlogArticleTypeService blogArticleTypeService;

    @GetMapping
    public JsonResult getAllArticleType() {
        List<ArticleTypeDto> result = blogArticleTypeService.getAllArticleType();
        return JsonResult.ok(result);
    }
}
